**Please note that these messages are still experimental and not standardized yet**

All messages must be sent with these HTTP headers:

    Content-Type: application/json
    Authorization: Bearer <authorization_token as defined in settings.py>

# OUTGOING MESSAGES

These are messages that you send to the ForgeFed server, in order to be shared.

## Follow a repository in a remote server

Description: a user on your server has asked to follow a repository on a
remote instance.

Request URL: `mcfi-host/<actor>`

Content:

    {
        "@context": "https://www.w3.org/ns/activitystreams",
        "summary":  "",
        "type":     "Follow",
        "actor":    leave empty, will be filled automatically,
        "object":   federation URL of the remote repository. The remote forge should
                    provide this to you, for instance https://fed.example.org/alice/repo3
    }

## New commit

Description: one of your repositories has a new commit, so we want to notify the
fediverse about it.

Request URL: `mcfi-host/<actor>`

Content:

    {
        "@context": "https://www.w3.org/ns/activitystreams",
        "type": "Create",
        "id": "",
        "to": Leave empty, will automatically send to all followers,
        "actor": leave empty, will be filled automatically,
        "object": {
            "type": "Note",
            "id": "",
            "attributedTo": "https://social.example/alyssa/",
            "to": ["https://chatty.example/ben/"],
            "content": ""
        }
    }

# INCOMING MESSAGES

These are messages that you receive from other servers.

## New commit

Description: you have received a notification about a remote repository that has
a new commit.

Request URL: `forge-host/<actor>`

Content:

    {
        "@context": "https://www.w3.org/ns/activitystreams",
        "type": "Create",
        "id": "",
        "to": Leave empty, will automatically send to all followers,
        "actor": leave empty, will be filled automatically,
        "object": {
            "type": "Note",
            "id": "",
            "attributedTo": "https://social.example/alyssa/",
            "to": ["https://chatty.example/ben/"],
            "content": ""
        }
    }



